package com.kaifamiao.collection;

import java.util.ArrayList;
import java.util.Collection;

public class ContainerTest2 {

	public static void main(String[] args) {
		
		Collection<String> c = new ArrayList<>();
		c.add( "唐长老" );
		c.add( "孙悟空" );
		c.add( "白龙马" );
		System.out.println( c );
		
		Collection<String> x = new ArrayList<>();
		x.add( "猪悟能" );
		x.add( "沙悟净" );
		System.out.println( x );
		
		Container container = new Container( c );
		System.out.println( container );
		
		container.addAll( x );
		
		System.out.println( container );
		
		Collection<String> e = new ArrayList<>();
		
		container.addAll( e );
		
		System.out.println( container );
		
		container.addAll( null );
		
		System.out.println( container );
		
		
	}

}
